package com.hz.web.service.impl;

import com.hz.web.dao.EmployeeMapper;
import com.hz.web.dao.UserDao;
import com.hz.web.entity.Employee;
import com.hz.web.entity.UserEntity;
import com.hz.web.service.IemployeeService;
import com.hz.web.service.IuserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class EmployeeImpl implements IemployeeService {

    @Resource
    private EmployeeMapper employeeMapper;


    /**
     * 查询用户集合
     *
     * @param map
     * @return
     */

    @Override
    public List<Employee> queryEmployeeList(Map<String, Object> map) {
        return employeeMapper.queryEmployeeList(map);
    }

    /**
     * 查询用户表总数量
     *
     * @param map
     * @return
     */
    @Override
    public int queryEmployeeCount(Map<String, Object> map) {

        return employeeMapper.queryEmployeeCount(map);
    }

    @Override
    public int insertSelective(Employee entity) {
        return employeeMapper.insertSelective(entity);
    }

    @Override
    public int insert(Employee entity) {
        return employeeMapper.insert(entity);
    }

    @Override
    public int updateEmployeeById(Employee employee) {
        return employeeMapper.updateByPrimaryKeySelective(employee);
    }

    @Override
    public List<Employee> queryEmployeeCertificate(Map<String, Object> parmsMap) {
       return employeeMapper.queryEmployeeCertificate(parmsMap);
    }

    @Override
    public int queryEmployeeCertificateCount(Map<String, Object> parmsMap) {
        return employeeMapper.queryEmployeeCertificateCount(parmsMap);
    }

    @Override
    public Employee selectByPrimaryKey(Integer userId) {
        return employeeMapper.selectByPrimaryKey(userId);
    }

}
